﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Zebra.Umbraco.Marcos
{
    public class QuestionGenerator
    {
        public static WebQeustion GetQuestion()
        {
            WebQeustion retVal = new WebQeustion();
            Random r = new Random(DateTime.Now.Millisecond);
            int number1 = r.Next(100);
            int number2 = r.Next(100);
            retVal.Question = string.Format("{0} + {1} = ?", number1, number2);
            retVal.Answer = (number2 + number1).ToString();
            return retVal;
        }
    }
    [Serializable]
    public struct WebQeustion
    {
        public string Question;
        public string Answer;
    }
}